<?	/* @var $sectionForm SectionFormForBackend */	?>
<?	/* @var $section Section */	?>

<? use_helper("jQuery"); ?>

<?
if ($sectionForm->getObject()->isNew()){
	$routeName="sections_create";
}else{
	$routeName="sections_update";
}
?>

<form action="<?= url_for($routeName, $sectionForm->getObject()) ?>" method="POST">
	<?=	$sectionForm->renderGlobalErrors() ?>
	<? if (!$sectionForm->getObject()->isNew()):// REST! ?>
		<input type="hidden" name="sf_method" value="PUT" />
	<? endif ?>
	<?=	$sectionForm->renderHiddenFields()	?>

	<div class="inline<?= $sectionForm["name"]->hasError()?" error":"" ?>">
		<?=	$sectionForm["name"]->renderError()	?>
		<?=	$sectionForm["name"]->renderLabel()	?>:
		<?=	$sectionForm["name"]->render()	?>
	</div>
	<input type="submit" value="Save" />
	<?= jq_submit_to_remote("name", "AJAX save", array("url" => url_for($routeName, $sectionForm->getObject()))) ?>
</form>

<form action="<?= url_for($routeName, $sectionForm->getObject()) ?>" method="POST">
	<?=	$sectionForm->renderGlobalErrors() ?>
	<? if (!$sectionForm->getObject()->isNew()):// REST! ?>
		<input type="hidden" name="sf_method" value="PUT" />
	<? endif ?>
	<?=	$sectionForm->renderHiddenFields()	?>

	<div class="inline<?= $sectionForm["url"]->hasError()?" error":"" ?>">
		<?=	$sectionForm["url"]->renderError()	?>
		<?=	$sectionForm["url"]->renderLabel()	?>:
		<?=	$sectionForm["url"]->render()	?>
	</div>
	<input type="submit" value="Save" />
	<?= jq_submit_to_remote("name", "AJAX save", array("url" => url_for($routeName, $sectionForm->getObject()))) ?>
</form>

<form action="<?= url_for($routeName, $sectionForm->getObject()) ?>" method="POST">
	<?=	$sectionForm->renderGlobalErrors() ?>
	<? if (!$sectionForm->getObject()->isNew()):// REST! ?>
		<input type="hidden" name="sf_method" value="PUT" />
	<? endif ?>
	<?=	$sectionForm->renderHiddenFields()	?>

	<div class="inline<?= $sectionForm["published"]->hasError()?" error":"" ?>">
		<?=	$sectionForm["published"]->renderError()	?>
		<?=	$sectionForm["published"]->renderLabel()	?>:
		<?=	$sectionForm["published"]->render()	?>
	</div>
	<input type="submit" value="Save" />
	<?= jq_submit_to_remote("name", "AJAX save", array("url" => url_for($routeName, $sectionForm->getObject()))) ?>
</form>

